package com.ym9527.jpa;

import com.ym9527.entity.PunchCardRecord;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;


public interface PunchCardRecordJpa extends JpaRepository<PunchCardRecord,Long> {


    PunchCardRecord findByPunchCardStudentIdAndDateStringAndPunchCardCourseId(Long studentId,String dateString,Long courseId);

    /**
    *这是获取某天某个学生的全部打卡
     */
    List<PunchCardRecord> findByPunchCardStudentIdAndDateString(Long studentId, String dateString);

    /**
     * 这是获取某个课程某天的打卡人数
     */
    List<PunchCardRecord> findByPunchCardCourseIdAndDateString(Long courseId,String dateString);

    List<PunchCardRecord> findByPunchCardStudentId(Long studentId);

}
